//
// Created by LiuYou on 2021/5/8.
//

#include <cstdio>
#include <cstdlib>

int main() {

    int year{2021};
    int month{5};
    int day{8};
    char buf[1024]{};
    std::sprintf(buf, "%d-%d-%d", year, month, day);
    std::fprintf(stdout, "%s\n", buf);
    std::puts(buf);


    char str[] = "1234a56";
    // 输出结果为1234, 会将不是字符的前边的数字输出。
    std::fprintf(stdout, "str: %d\n", std::atoi(str));


//    return 0;
    std::exit(0);
}